<template>
  <div>
      <h1>继续绑定账号</h1>
      <P>绑定微博账号{{uid}}到本地账号上,请输入要绑定的账号信息</P>

      用户名:<input type="text" v-model="username">
      密码:<input type="text" v-model="password">
      <input type="button" value="绑定" @click="bind">
  </div>
</template>

<script>
export default {
    data(){
        return {
            uid:this.$route.query.uid,
            username:"",
            password:"",
        }
    },
    methods:{
        bind(){
            const data={
                "username":this.username,
                "password":this.password,
                "uid":this.uid,
            }
            this.axios.post("http://127.0.0.1:8000/weibo",data).then(resp=>{
                console.log(resp.data)
                alert(resp.data.msg)
            }).catch(error=>{
                console.log(error.response)
                alert(error.response.data.msg)
            })
        }
    }
}
</script>

<style>

</style>